Optimal. Leaf size=187 \[ \frac {4 a (9 A+8 B) \tan (c+d x)}{45 d \sqrt {a+a \sec (c+d x)}}+\frac {2 a (9 A+8 B) \sec ^3(c+d x) \tan (c+d x)}{63 d \sqrt {a+a \sec (c+d x)}}+\frac {2 a B \sec ^4(c+d x) \tan (c+d x)}{9 d \sqrt {a+a \sec (c+d x)}}-\frac {8 (9 A+8 B) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{315 d}+\frac {4 (9 A+8 B) (a+a \sec (c+d x))^{3/2} \tan (c+d x)}{105 a d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.22, antiderivative size = 187, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.152, Rules used = {4101, 3888,
3885, 4086, 3877} \begin {gather*} \frac {2 a (9 A+8 B) \tan (c+d x) \sec ^3(c+d x)}{63 d \sqrt {a \sec (c+d x)+a}}+\frac {4 (9 A+8 B) \tan (c+d x) (a \sec (c+d x)+a)^{3/2}}{105 a d}-\frac {8 (9 A+8 B) \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{315 d}+\frac {4 a (9 A+8 B) \tan (c+d x)}{45 d \sqrt {a \sec (c+d x)+a}}+\frac {2 a B \tan (c+d x) \sec ^4(c+d x)}{9 d \sqrt {a \sec (c+d x)+a}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3877
Rule 3885
Rule 3888
Rule 4086
Rule 4101
Rubi steps
\begin {align*} \int \sec ^4(c+d x) \sqrt {a+a \sec (c+d x)} (A+B \sec (c+d x)) \, dx &=\frac {2 a B \sec ^4(c+d x) \tan (c+d x)}{9 d \sqrt {a+a \sec (c+d x)}}+\frac {1}{9} (9 A+8 B) \int \sec ^4(c+d x) \sqrt {a+a \sec (c+d x)} \, dx\\ &=\frac {2 a (9 A+8 B) \sec ^3(c+d x) \tan (c+d x)}{63 d \sqrt {a+a \sec (c+d x)}}+\frac {2 a B \sec ^4(c+d x) \tan (c+d x)}{9 d \sqrt {a+a \sec (c+d x)}}+\frac {1}{21} (2 (9 A+8 B)) \int \sec ^3(c+d x) \sqrt {a+a \sec (c+d x)} \, dx\\ &=\frac {2 a (9 A+8 B) \sec ^3(c+d x) \tan (c+d x)}{63 d \sqrt {a+a \sec (c+d x)}}+\frac {2 a B \sec ^4(c+d x) \tan (c+d x)}{9 d \sqrt {a+a \sec (c+d x)}}+\frac {4 (9 A+8 B) (a+a \sec (c+d x))^{3/2} \tan (c+d x)}{105 a d}+\frac {(4 (9 A+8 B)) \int \sec (c+d x) \left (\frac {3 a}{2}-a \sec (c+d x)\right ) \sqrt {a+a \sec (c+d x)} \, dx}{105 a}\\ &=\frac {2 a (9 A+8 B) \sec ^3(c+d x) \tan (c+d x)}{63 d \sqrt {a+a \sec (c+d x)}}+\frac {2 a B \sec ^4(c+d x) \tan (c+d x)}{9 d \sqrt {a+a \sec (c+d x)}}-\frac {8 (9 A+8 B) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{315 d}+\frac {4 (9 A+8 B) (a+a \sec (c+d x))^{3/2} \tan (c+d x)}{105 a d}+\frac {1}{45} (2 (9 A+8 B)) \int \sec (c+d x) \sqrt {a+a \sec (c+d x)} \, dx\\ &=\frac {4 a (9 A+8 B) \tan (c+d x)}{45 d \sqrt {a+a \sec (c+d x)}}+\frac {2 a (9 A+8 B) \sec ^3(c+d x) \tan (c+d x)}{63 d \sqrt {a+a \sec (c+d x)}}+\frac {2 a B \sec ^4(c+d x) \tan (c+d x)}{9 d \sqrt {a+a \sec (c+d x)}}-\frac {8 (9 A+8 B) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{315 d}+\frac {4 (9 A+8 B) (a+a \sec (c+d x))^{3/2} \tan (c+d x)}{105 a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.60, size = 98, normalized size = 0.52 \begin {gather*} \frac {2 a \left (16 (9 A+8 B)+8 (9 A+8 B) \sec (c+d x)+6 (9 A+8 B) \sec ^2(c+d x)+5 (9 A+8 B) \sec ^3(c+d x)+35 B \sec ^4(c+d x)\right ) \tan (c+d x)}{315 d \sqrt {a (1+\sec (c+d x))}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 3.92, size = 138, normalized size = 0.74
method | result | size |
default | \(-\frac {2 \left (-1+\cos \left (d x +c \right )\right ) \left (144 A \left (\cos ^{4}\left (d x +c \right )\right )+128 B \left (\cos ^{4}\left (d x +c \right )\right )+72 A \left (\cos ^{3}\left (d x +c \right )\right )+64 B \left (\cos ^{3}\left (d x +c \right )\right )+54 A \left (\cos ^{2}\left (d x +c \right )\right )+48 B \left (\cos ^{2}\left (d x +c \right )\right )+45 A \cos \left (d x +c \right )+40 B \cos \left (d x +c \right )+35 B \right ) \sqrt {\frac {a \left (1+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}}{315 d \cos \left (d x +c \right )^{4} \sin \left (d x +c \right )}\) | \(138\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.55, size = 122, normalized size = 0.65 \begin {gather*} \frac {2 \, {\left (16 \, {\left (9 \, A + 8 \, B\right )} \cos \left (d x + c\right )^{4} + 8 \, {\left (9 \, A + 8 \, B\right )} \cos \left (d x + c\right )^{3} + 6 \, {\left (9 \, A + 8 \, B\right )} \cos \left (d x + c\right )^{2} + 5 \, {\left (9 \, A + 8 \, B\right )} \cos \left (d x + c\right ) + 35 \, B\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{315 \, {\left (d \cos \left (d x + c\right )^{5} + d \cos \left (d x + c\right )^{4}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {a \left (\sec {\left (c + d x \right )} + 1\right )} \left (A + B \sec {\left (c + d x \right )}\right ) \sec ^{4}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.13, size = 268, normalized size = 1.43 \begin {gather*} \frac {2 \, {\left (315 \, \sqrt {2} A a^{5} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 315 \, \sqrt {2} B a^{5} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) - {\left (630 \, \sqrt {2} A a^{5} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 420 \, \sqrt {2} B a^{5} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) - {\left (756 \, \sqrt {2} A a^{5} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 882 \, \sqrt {2} B a^{5} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) - {\left (522 \, \sqrt {2} A a^{5} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 324 \, \sqrt {2} B a^{5} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) - {\left (81 \, \sqrt {2} A a^{5} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 107 \, \sqrt {2} B a^{5} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{315 \, {\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a\right )}^{4} \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 10.05, size = 512, normalized size = 2.74 \begin {gather*} \frac {\sqrt {a+\frac {a}{\frac {{\mathrm {e}}^{-c\,1{}\mathrm {i}-d\,x\,1{}\mathrm {i}}}{2}+\frac {{\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}}{2}}}\,\left ({\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}\,\left (\frac {A\,16{}\mathrm {i}}{5\,d}+\frac {\left (48\,A-32\,B\right )\,1{}\mathrm {i}}{105\,d}\right )+\frac {\left (336\,A+672\,B\right )\,1{}\mathrm {i}}{105\,d}\right )}{\left ({\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}+1\right )\,{\left ({\mathrm {e}}^{c\,2{}\mathrm {i}+d\,x\,2{}\mathrm {i}}+1\right )}^2}-\frac {\sqrt {a+\frac {a}{\frac {{\mathrm {e}}^{-c\,1{}\mathrm {i}-d\,x\,1{}\mathrm {i}}}{2}+\frac {{\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}}{2}}}\,\left ({\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}\,\left (\frac {A\,16{}\mathrm {i}}{7\,d}-\frac {B\,320{}\mathrm {i}}{63\,d}\right )+\frac {B\,32{}\mathrm {i}}{7\,d}+\frac {\left (144\,A+288\,B\right )\,1{}\mathrm {i}}{63\,d}\right )}{\left ({\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}+1\right )\,{\left ({\mathrm {e}}^{c\,2{}\mathrm {i}+d\,x\,2{}\mathrm {i}}+1\right )}^3}+\frac {\sqrt {a+\frac {a}{\frac {{\mathrm {e}}^{-c\,1{}\mathrm {i}-d\,x\,1{}\mathrm {i}}}{2}+\frac {{\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}}{2}}}\,\left (-\frac {A\,16{}\mathrm {i}}{9\,d}+{\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}\,\left (\frac {A\,16{}\mathrm {i}}{9\,d}-\frac {\left (16\,A+32\,B\right )\,1{}\mathrm {i}}{9\,d}\right )+\frac {\left (16\,A+32\,B\right )\,1{}\mathrm {i}}{9\,d}\right )}{\left ({\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}+1\right )\,{\left ({\mathrm {e}}^{c\,2{}\mathrm {i}+d\,x\,2{}\mathrm {i}}+1\right )}^4}-\frac {{\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}\,\sqrt {a+\frac {a}{\frac {{\mathrm {e}}^{-c\,1{}\mathrm {i}-d\,x\,1{}\mathrm {i}}}{2}+\frac {{\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}}{2}}}\,\left (288\,A+256\,B\right )\,1{}\mathrm {i}}{315\,d\,\left ({\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}+1\right )}-\frac {{\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}\,\sqrt {a+\frac {a}{\frac {{\mathrm {e}}^{-c\,1{}\mathrm {i}-d\,x\,1{}\mathrm {i}}}{2}+\frac {{\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}}{2}}}\,\left (144\,A+128\,B\right )\,1{}\mathrm {i}}{315\,d\,\left ({\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}+1\right )\,\left ({\mathrm {e}}^{c\,2{}\mathrm {i}+d\,x\,2{}\mathrm {i}}+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________